#pragma once
#include "stack.h"
#include "queue.h"
#include <iostream>
#include <string>
#include <cstring>

typedef struct ParkingInfo
{
	char   plateNumber[128];
	float  carSize;
	int    time;
	int    waitingTime = 0;
}ParkingInfo;

class ParkingLot
{
private:
    DS::queue<ParkingInfo> waiting_q;
    DS::stack<ParkingInfo> parking_s;
    int	 space_occupied = 0;
	int	 max_car_space = 2;
	int	 park_per_hour = 10;
	int	 wait_per_hour = 1;	
	char popInfo[512];
public:
	// ctor & dtor
	ParkingLot();
	ParkingLot(int max_space);
	~ParkingLot();

    // If the car arrives, print the car's position
    void arrive(ParkingInfo const& car);

    // If the car departs, print the time the car stayed in the parking lot and the fee to be paid
    void depart(ParkingInfo const& car);

	void setParkPerHour(int n);
	void setWaitPerHour(int n);
	void setMaxCarSpace(int n);

	int getParkPerHour();
	int getWaitPerHour();
	int getMaxCarSpace();

	int getStackSize();
	char* getPlateInStack(int i);
	int getSizeInStack(int i);
	int getTimeInStack(int i);

	int getQueueSize();
	char* getPlateInQueue(int i);
	int getSizeInQueue(int i);
	int getTimeInQueue(int i);

	char* getPopInfo();
};
